package com.baike.service;

import com.baike.entity.TbLesson;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author author
 * @since 2021-10-29
 */
public interface ITbLessonService extends IService<TbLesson> {

    //获取购物车
    List<TbLesson> findListCartFromRedis(String uname);

    //合并购物车
    List<TbLesson> merageCartList(List<TbLesson> lessonListCookie, List<TbLesson> listCartFromRedis, String studentAccount);

    //添加购物车
    List<TbLesson> addCart(List<TbLesson> cartList, Integer itemId);

    //将购物车列表添加到 Redis
    void addCartListToRedis(List<TbLesson> cartList, String uname);
}
